<script type="text/ng-template" id="compare_dialog">
	<div class="modal-header">
        <h4 class="modal-title">比价</h4>
    </div>
    <div class="modal-body">
		<div class="row">
			<table class="table order-table-detail">
		        <tbody>
					<tr>
		                <td class="nob_t">
		                    <div class="col-xs-6"><span class="color666666" style="float:left;width:65px;">货品名称：</span>
                                <div class="col-xs-8">
									<span ng-bind="reqData.MainTable[0].MaterialName"></span>
                                </div>
		                    </div>
							<div class="col-xs-6"><span class="color666666" style="float:left;width:65px;">数量：</span>
		                    	<div class="col-xs-8">
										<span ng-bind="reqData.MainTable[0].Quantity"></span>
                                </div>
		                    </div> 
		                    <div class="col-xs-6"><span class="color666666" style="float:left;width:65px;">业务员：</span>
                                <div class="col-xs-8">
                                	<input type="hidden" ng-model="reqData.MainTable[0].PersonCode" />
                                    <div class="input-group"><input type="text" class="col-xs-2 form-control" placeholder="业务员" ng-model="reqData.MainTable[0].PersonName" onkeydown="return false;"/>
        							<div class="btn input-group-addon btn-sm" ng-click="showPersonSelectDlg()"><i class="glyphicon glyphicon-search"></i></div></div>
                                </div>
		                    </div>
							<div class="col-xs-6"><span class="color666666" style="float:left;width:65px;">部门：</span>
		                    	<div class="col-xs-8">
                                    <input type="hidden" ng-model="reqData.MainTable[0].DeptCode" />
                                    <div class="input-group"><input type="text" class="col-xs-2 form-control" placeholder="部门" ng-model="reqData.MainTable[0].DeptName" onkeydown="return false;"/>
        							<div class="btn input-group-addon btn-sm" ng-click="showDeptSelectDlg()"><i class="glyphicon glyphicon-search"></i></div></div>
                                </div>
		                    </div> 
							<div class="col-xs-12"><span class="color666666" style="float:left;width:65px;">备注：</span>
		                		<div class="col-xs-10">
		                            <textarea style="height: 100px;resize:none;width:800px" class="form-text-inp" ng-model="reqData.MainTable[0].Remark" maxlength="255" placeholder="限255个字"></textarea>
		                		</div>
		                	</div>
		                </td>
		            </tr>
					<tr>
						<td style="border-bottom:none">
						<div class="col-xs-12" style="height:250px;overflow-y: scroll;">
							<div class="col-xs-12 "><button class="btn btn-warning" style="float:right;margin-bottom:4px;margin-right:-14px" ng-click="selectLow()">最低价胜出</button></div>
							<table class="table table-bordered order-table-detail2">
		        <thead>
		            <tr>
		                <th width="100">供应商编号</th>
		                <th width="350">供应商名称</th>
		                <th width="100">报价</th>
		                <th width="50">胜出</th>
						<th width="50">胜出原因</th>
						<th width="100">交货周期</th>
		                <th width="100">质量承诺</th>
		                <th width="50">备注</th>
		            </tr>
		        </thead>
		        <tbody>
		            <tr ng-repeat="item in reqData.SubTable">
		            	<td width="50"><span ng-bind="item.VendorCode"></span></td>
		            	<td width="50"><span ng-bind="item.VendorName"></span></td>
		            	<td width="50" ng-class="{floorPrice:item.IsFloorPrice}"><span ng-bind="item.InTaxPrice | number:4"></span></td>
						<td width="50"><input type="checkbox" ng-model="item.IsLowestVictory" ng-click="selectIt(item)"></td>
						<td width="50"><input type="text" ng-model="item.VictoryReason" ng-disabled="item.disabled"/></td>
						<td width="50"><span ng-bind="item.DeliveryCycleCode"></span></td>
		            	<td width="50"><span ng-bind="item.QualityPromises"></span></td>
						<td width="50"><input type="text" ng-model="item.RemarkSub"/></td>
		            </tr>
		        </tbody>
		    </table>
</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
    </div>
    <div>
        <div class="modal-footer">
            <div class="col-xs-12">
				<button class="btn btn-save btn-warning" ng-disabled="bSubmitDisabled" ng-click="saveAndSubmit()">保存并提交</button>
                <button class="btn btn-save btn-warning" ng-disabled="bSubmitDisabled" ng-click="save()">保存</button>
 				<button class="btn btn-save " ng-disabled="bSubmitDisabled" ng-click="closeDialog()">取消</button>
            </div>
        </div>
    </div>
</script>
